package com.shuiyun.chat;

import com.shuiyun.chat.server.ChatServer;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ApplicationContext;

/**
 *
 * @author shuiyun
 * @date 2021/5/12 17:42
 */
@SpringBootApplication
public class ChatServerApplication {

	public static void main(String[] args) {
		ApplicationContext context = new SpringApplicationBuilder(ChatServerApplication.class)
				.web(WebApplicationType.SERVLET)
				.run(args);
		ChatServer chatServer = context.getBean(ChatServer.class);
		chatServer.start();
	}

}
